









/****** Object:  Table [dbo].[Currencies]    Script Date: 07/25/2012 06:08:52 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Currencies]') AND type in (N'U'))
DROP TABLE [dbo].[Currencies]
GO


/****** Object:  Table [dbo].[Currencies]    Script Date: 07/25/2012 06:08:52 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[Currencies](
	[CurrencyID] [int] NOT NULL  IDENTITY(1,1),
	[Name] [nchar](30) NOT NULL,
	[Abbreviation] [nchar](3) NOT NULL,
 CONSTRAINT [PK_Currencies] PRIMARY KEY CLUSTERED 
(
	[CurrencyID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

/****** Object:  Table [dbo].[ExchangeRates]    Script Date: 07/25/2012 20:57:55 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ExchangeRates]') AND type in (N'U'))
DROP TABLE [dbo].[ExchangeRates]
GO



/****** Object:  Table [dbo].[ExchangeRates]    Script Date: 07/25/2012 20:57:55 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[ExchangeRates](
	[ExchangeRateID] [int] IDENTITY(1,1) NOT NULL,
	[CurrencyID] [int] NULL,
	[RateToUsDollar] [float] NULL,
 CONSTRAINT [PK_ExchangeRates] PRIMARY KEY CLUSTERED 
(
	[ExchangeRateID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO


/****** Object:  Table [dbo].[Divisions]    Script Date: 07/25/2012 06:09:36 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Divisions]') AND type in (N'U'))
DROP TABLE [dbo].[Divisions]
GO



/****** Object:  Table [dbo].[Divisions]    Script Date: 07/25/2012 06:09:36 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[Divisions](
	[DivisionID] [int] NOT NULL IDENTITY(1,1),
	[Name] [nvarchar](50) NOT NULL,
 CONSTRAINT [PK_Divisions] PRIMARY KEY CLUSTERED 
(
	[DivisionID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO



/****** Object:  Table [dbo].[Offices]    Script Date: 07/25/2012 06:09:59 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Offices]') AND type in (N'U'))
DROP TABLE [dbo].[Offices]
GO



/****** Object:  Table [dbo].[Offices]    Script Date: 07/25/2012 06:09:59 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[Offices](
	[OfficeID] [int] NOT NULL  IDENTITY(1,1),
	[Name] [nvarchar](50) NOT NULL,
 CONSTRAINT [PK_Offices] PRIMARY KEY CLUSTERED 
(
	[OfficeID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO



IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_UserProfiles_aspnet_Users]') AND parent_object_id = OBJECT_ID(N'[dbo].[UserProfiles]'))
ALTER TABLE [dbo].[UserProfiles] DROP CONSTRAINT [FK_UserProfiles_aspnet_Users]
GO

IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_UserProfiles_Divisions]') AND parent_object_id = OBJECT_ID(N'[dbo].[UserProfiles]'))
ALTER TABLE [dbo].[UserProfiles] DROP CONSTRAINT [FK_UserProfiles_Divisions]
GO

IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_UserProfiles_Offices]') AND parent_object_id = OBJECT_ID(N'[dbo].[UserProfiles]'))
ALTER TABLE [dbo].[UserProfiles] DROP CONSTRAINT [FK_UserProfiles_Offices]
GO



/****** Object:  Table [dbo].[UserProfiles]    Script Date: 07/25/2012 06:10:08 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[UserProfiles]') AND type in (N'U'))
DROP TABLE [dbo].[UserProfiles]
GO


/****** Object:  Table [dbo].[UserProfiles]    Script Date: 07/25/2012 06:10:08 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[UserProfiles](
	[UserID] [uniqueidentifier] NOT NULL,
	[OfficeID] [int] NULL,
	[DivisionID] [int] NULL,
	[Firstname] [nvarchar](30) NULL,
	[Lastname] [nvarchar](30) NULL,
 CONSTRAINT [PK_UserProfiles2] PRIMARY KEY CLUSTERED 
(
	[UserID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

ALTER TABLE [dbo].[UserProfiles]  WITH CHECK ADD  CONSTRAINT [FK_UserProfiles_aspnet_Users] FOREIGN KEY([UserID])
REFERENCES [dbo].[aspnet_Users] ([UserId])
ON DELETE CASCADE
GO

ALTER TABLE [dbo].[UserProfiles] CHECK CONSTRAINT [FK_UserProfiles_aspnet_Users]
GO

ALTER TABLE [dbo].[UserProfiles]  WITH CHECK ADD  CONSTRAINT [FK_UserProfiles_Divisions] FOREIGN KEY([DivisionID])
REFERENCES [dbo].[Divisions] ([DivisionID])
GO

ALTER TABLE [dbo].[UserProfiles] CHECK CONSTRAINT [FK_UserProfiles_Divisions]
GO

ALTER TABLE [dbo].[UserProfiles]  WITH CHECK ADD  CONSTRAINT [FK_UserProfiles_Offices] FOREIGN KEY([OfficeID])
REFERENCES [dbo].[Offices] ([OfficeID])
GO

ALTER TABLE [dbo].[UserProfiles] CHECK CONSTRAINT [FK_UserProfiles_Offices]
GO



/****** Object:  Table [dbo].[ArtistType]    Script Date: 07/25/2012 20:54:38 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ArtistType]') AND type in (N'U'))
DROP TABLE [dbo].[ArtistType]
GO


/****** Object:  Table [dbo].[ArtistType]    Script Date: 07/25/2012 20:54:38 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[ArtistType](
	[ArtistTypeID] [int] IDENTITY(1,1) NOT NULL,
	[Name] [nvarchar](30) NULL,
 CONSTRAINT [PK_ArtistType] PRIMARY KEY CLUSTERED 
(
	[ArtistTypeID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO



/****** Object:  Table [dbo].[ArtistSubType]    Script Date: 07/25/2012 20:54:51 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ArtistSubType]') AND type in (N'U'))
DROP TABLE [dbo].[ArtistSubType]
GO



/****** Object:  Table [dbo].[ArtistSubType]    Script Date: 07/25/2012 20:54:51 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[ArtistSubType](
	[ArtistSubTypeID] [int] IDENTITY(1,1) NOT NULL,
	[Name] [nvarchar](30) NULL,
 CONSTRAINT [PK_ArtistSubType] PRIMARY KEY CLUSTERED 
(
	[ArtistSubTypeID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

/****** Object:  Table [dbo].[Artists]    Script Date: 07/25/2012 21:26:05 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Artists]') AND type in (N'U'))
DROP TABLE [dbo].[Artists]
GO


/****** Object:  Table [dbo].[Artists]    Script Date: 07/25/2012 21:26:06 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[Artists](
	[ArtistID] [int] IDENTITY(1,1) NOT NULL,
	[Firstname] [nvarchar](30) NULL,
	[Lastname] [nvarchar](30) NULL,
	[GL_Code] [nvarchar](50) NULL,
	[IsPerson] [bit] NOT NULL,
	[GroupName] [nvarchar](50) NULL,
	[ArtistTypeID] [int] NOT NULL,
	[ArtistSubTypeID] [int] NULL,
 CONSTRAINT [PK_Artists] PRIMARY KEY CLUSTERED 
(
	[ArtistID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_ArtistsManagers_Artists]') AND parent_object_id = OBJECT_ID(N'[dbo].[ArtistsManagers]'))
ALTER TABLE [dbo].[ArtistsManagers] DROP CONSTRAINT [FK_ArtistsManagers_Artists]
GO

IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_ArtistsManagers_aspnet_Users]') AND parent_object_id = OBJECT_ID(N'[dbo].[ArtistsManagers]'))
ALTER TABLE [dbo].[ArtistsManagers] DROP CONSTRAINT [FK_ArtistsManagers_aspnet_Users]
GO



/****** Object:  Table [dbo].[ArtistsManagers]    Script Date: 07/25/2012 06:08:37 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ArtistsManagers]') AND type in (N'U'))
DROP TABLE [dbo].[ArtistsManagers]
GO


/****** Object:  Table [dbo].[ArtistsManagers]    Script Date: 07/25/2012 06:08:37 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[ArtistsManagers](
	[ArtistID] [int] NOT NULL,
	[UserID] [uniqueidentifier] NOT NULL
) ON [PRIMARY]

GO

ALTER TABLE [dbo].[ArtistsManagers]  WITH CHECK ADD  CONSTRAINT [FK_ArtistsManagers_Artists] FOREIGN KEY([ArtistID])
REFERENCES [dbo].[Artists] ([ArtistID])
ON DELETE CASCADE
GO

ALTER TABLE [dbo].[ArtistsManagers] CHECK CONSTRAINT [FK_ArtistsManagers_Artists]
GO

ALTER TABLE [dbo].[ArtistsManagers]  WITH CHECK ADD  CONSTRAINT [FK_ArtistsManagers_aspnet_Users] FOREIGN KEY([UserID])
REFERENCES [dbo].[aspnet_Users] ([UserId])
ON DELETE CASCADE
GO

ALTER TABLE [dbo].[ArtistsManagers] CHECK CONSTRAINT [FK_ArtistsManagers_aspnet_Users]
GO






IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Forecasts_Artists]') AND parent_object_id = OBJECT_ID(N'[dbo].[Forecasts]'))
ALTER TABLE [dbo].[Forecasts] DROP CONSTRAINT [FK_Forecasts_Artists]
GO

IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Forecasts_aspnet_Users]') AND parent_object_id = OBJECT_ID(N'[dbo].[Forecasts]'))
ALTER TABLE [dbo].[Forecasts] DROP CONSTRAINT [FK_Forecasts_aspnet_Users]
GO

IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Forecasts_Currencies]') AND parent_object_id = OBJECT_ID(N'[dbo].[Forecasts]'))
ALTER TABLE [dbo].[Forecasts] DROP CONSTRAINT [FK_Forecasts_Currencies]
GO

IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Forecasts_Forecasts]') AND parent_object_id = OBJECT_ID(N'[dbo].[Forecasts]'))
ALTER TABLE [dbo].[Forecasts] DROP CONSTRAINT [FK_Forecasts_Forecasts]
GO



/****** Object:  Table [dbo].[Forecasts]    Script Date: 07/25/2012 06:09:46 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Forecasts]') AND type in (N'U'))
DROP TABLE [dbo].[Forecasts]
GO



/****** Object:  Table [dbo].[Forecasts]    Script Date: 07/25/2012 06:09:46 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[Forecasts](
	[ForecastID] [int] NOT NULL IDENTITY(1,1),
	[Date] [date] NULL,
	[Amount] [money] NULL,
	[ArtistID] [int] NULL,
	[UserID] [uniqueidentifier] NULL,
	[CurrencyID] [int] NULL,
 CONSTRAINT [PK_Forecasts] PRIMARY KEY CLUSTERED 
(
	[ForecastID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

ALTER TABLE [dbo].[Forecasts]  WITH CHECK ADD  CONSTRAINT [FK_Forecasts_Artists] FOREIGN KEY([ArtistID])
REFERENCES [dbo].[Artists] ([ArtistID])
ON DELETE CASCADE
GO

ALTER TABLE [dbo].[Forecasts] CHECK CONSTRAINT [FK_Forecasts_Artists]
GO

ALTER TABLE [dbo].[Forecasts]  WITH CHECK ADD  CONSTRAINT [FK_Forecasts_aspnet_Users] FOREIGN KEY([UserID])
REFERENCES [dbo].[aspnet_Users] ([UserId])
GO

ALTER TABLE [dbo].[Forecasts] CHECK CONSTRAINT [FK_Forecasts_aspnet_Users]
GO

ALTER TABLE [dbo].[Forecasts]  WITH CHECK ADD  CONSTRAINT [FK_Forecasts_Currencies] FOREIGN KEY([CurrencyID])
REFERENCES [dbo].[Currencies] ([CurrencyID])
GO

ALTER TABLE [dbo].[Forecasts] CHECK CONSTRAINT [FK_Forecasts_Currencies]
GO

ALTER TABLE [dbo].[Forecasts]  WITH CHECK ADD  CONSTRAINT [FK_Forecasts_Forecasts] FOREIGN KEY([ForecastID])
REFERENCES [dbo].[Forecasts] ([ForecastID])
GO

ALTER TABLE [dbo].[Forecasts] CHECK CONSTRAINT [FK_Forecasts_Forecasts]
GO






/****** Object:  View [dbo].[ForecastByArtist]    Script Date: 07/25/2012 21:07:16 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[ForecastByArtist]'))
DROP VIEW [dbo].[ForecastByArtist]
GO


/****** Object:  View [dbo].[ForecastByArtist]    Script Date: 07/25/2012 21:07:16 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO


USE [ImgForecast]
GO



CREATE VIEW [dbo].[ForecastByArtist]
AS
SELECT     dbo.Artists.Lastname + ', ' + dbo.Artists.Firstname AS ArtistName, dbo.UserProfiles.Lastname + ', ' + dbo.UserProfiles.Firstname AS MgrName, 
                      dbo.aspnet_Membership.Email AS MgrEmail, dbo.Currencies.Abbreviation AS Currency, dbo.Divisions.Name AS Division,
                          (SELECT     dbo.Forecasts.Amount
                            WHERE      (dbo.Forecasts.Date = '2012-08-01')) AS Aug2012,
                          (SELECT     dbo.Forecasts.Amount
                            WHERE      (dbo.Forecasts.Date = '2012-09-01')) AS Sep2012
FROM         dbo.Artists INNER JOIN
                      dbo.ArtistsManagers ON dbo.Artists.ArtistID = dbo.ArtistsManagers.ArtistID INNER JOIN
                      dbo.aspnet_Users ON dbo.ArtistsManagers.UserID = dbo.aspnet_Users.UserId INNER JOIN
                      dbo.UserProfiles ON dbo.aspnet_Users.UserId = dbo.UserProfiles.UserID INNER JOIN
                      dbo.Forecasts ON dbo.Artists.ArtistID = dbo.Forecasts.ArtistID AND dbo.aspnet_Users.UserId = dbo.Forecasts.UserID INNER JOIN
                      dbo.aspnet_Membership ON dbo.aspnet_Users.UserId = dbo.aspnet_Membership.UserId INNER JOIN
                      dbo.Currencies ON dbo.Forecasts.CurrencyID = dbo.Currencies.CurrencyID INNER JOIN
                      dbo.Divisions ON dbo.UserProfiles.DivisionID = dbo.Divisions.DivisionID INNER JOIN
                      dbo.Offices ON dbo.UserProfiles.OfficeID = dbo.Offices.OfficeID

GO

EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[59] 4[4] 2[19] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = -122
         Left = 0
      End
      Begin Tables = 
         Begin Table = "Artists"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 125
               Right = 198
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "ArtistsManagers"
            Begin Extent = 
               Top = 6
               Left = 236
               Bottom = 95
               Right = 396
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "aspnet_Users"
            Begin Extent = 
               Top = 6
               Left = 434
               Bottom = 125
               Right = 613
            End
            DisplayFlags = 280
            TopColumn = 3
         End
         Begin Table = "UserProfiles"
            Begin Extent = 
               Top = 96
               Left = 236
               Bottom = 215
               Right = 396
            End
            DisplayFlags = 280
            TopColumn = 1
         End
         Begin Table = "Forecasts"
            Begin Extent = 
               Top = 126
               Left = 38
               Bottom = 245
               Right = 198
            End
            DisplayFlags = 280
            TopColumn = 2
         End
         Begin Table = "aspnet_Membership"
            Begin Extent = 
               Top = 126
               Left = 434
               Bottom = 292
               Right = 734
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Currencies"
            Begin Extent = 
               Top = 216
               Left = 236
               Bottom = 320
               Right = 396
            End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'ForecastByArtist'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane2', @value=N'
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Divisions"
            Begin Extent = 
               Top = 246
               Left = 38
               Bottom = 335
               Right = 198
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Offices"
            Begin Extent = 
               Top = 294
               Left = 434
               Bottom = 383
               Right = 594
            End
            DisplayFlags = 280
            TopColumn = 0
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
      Begin ColumnWidths = 10
         Width = 284
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'ForecastByArtist'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=2 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'ForecastByArtist'
GO


